package _2_adapter

//目标接口
type Target interface {
	Do() string
}

//适配者
type Adaptee struct {
	name string
}

func (self *Adaptee) printName() string{
	str := "适配者中的业务代码被调用！";
	return str
}

//适配器
type Adapter struct {
	adaptee Adaptee
}

func (self *Adapter)Do() string {
	name := self.adaptee.printName()
	return name
}
